/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package jfinance;

/**
 *
 * @author efim
 */
public class OutgoTransaction implements Transaction{

    private String name;
    
    private double amount;
    
    private long date;
    
    private String currency;
    
    private Account account;
    
    public OutgoTransaction(String name,double amount,long date,String currency,Account account)
    {
        this.name = name;
        this.amount = amount;
        this.currency = currency;
        this.date = date;
        this.account = account;
    }
    @Override
    public String getName() 
    {
        return name;
    }

    @Override
    public double getAmount() 
    {
        return amount;
    }

    @Override
    public long getDate() 
    {
        return date;
    }

    @Override
    public String getCurrencySymbol() 
    {
        return currency;
    }

    @Override
    public Account getAccount()
    {
        return account;
    }

    @Override
    public double calculateAmount(double a) 
    {
        return a-amount;
    }
    
}

